package com.bitongchong.real;

import java.util.Scanner;

public class 贪吃的小Q {
	public static int sum(int x, int n) {
		int sum = 0;
		for (int i = 0; i < n; i++) {
			sum += (x + 1) >> 1;
		}
		return sum;
	}

	public static void main(String[] args) {
		@SuppressWarnings("resource")
		Scanner scanner = new Scanner(System.in);
		int N = scanner.nextInt();
		int M = scanner.nextInt();
		int l = 1;
		int r = M;
		while (l < r) {
			int mid = (l + r) >> 1;
			int sum = sum(mid, N);
			if (sum == M) {
				break;
			}
			if (sum < M) {

				l = mid + 1;
			}
			if (sum > M) {

				r = mid;
			}
		}
		System.out.println(l);
	}
}
